<?php if ($this->session->flashdata('message')) { ?>
	<div class="alert alert-block alert-success">
 <button type="button" class="close" data-dismiss="alert"><i class="icon-remove"></i></button>
 <i class="icon-ok green"></i> <?php echo $this->session->flashdata('message'); ?>
</div>
<?php } ?>
<h3 class="header smaller red"><?=lang('renew_warning')?></h3>
<div class="row-fluid">
	<div class="span3">
		<div class="widget-box transparent">
			<div class="widget-header">
				<h5 class="bigger lighter">Package Name</h5>
			</div>
			<div class="widget-body">
			 <div class="widget-main no-padding">
				<ul class="unstyled list-striped pricing-table-header">
					<li>Premium Files </li>
					<li>Days </li>
					<li>Bandwidth </li>
					<li>Free Support </li>
					<li>Ad Credit </li>
					<li>Free Domain </li>
				</ul>
			 </div>
			</div>
		</div>
	</div>
		<?php
				if (!empty($membership)) { ?>
				<?php
				foreach ($membership as $key => $package) { ?>
	
	<div class="span2 pricing-span">
		<div class="widget-box pricing-box-small">
			<div class="widget-header <?php
			if($package['m_id'] == '1'){
				echo "header-color-red3";
			}elseif($package['m_id'] == '2'){
				echo "header-color-orange";
			}elseif($package['m_id'] == '3'){
				echo "header-color-blue";
			}elseif($package['m_id'] == '4'){
				echo "header-color-green";
			}else{
				echo "header-color-grey";
			}?>">
				<h5 class="lighter" style="font-size:13px;"><?=$package['membership']?></h5>
			</div>
			<div class="widget-body">
			 <div class="widget-main no-padding">
				<ul class="unstyled list-striped pricing-table">
					<?=$package['description']?>
				</ul>
				
				<div class="price">
					<span class="label label-large label-inverse arrowed-in arrowed-in-right"><?=$this->config->item('curreny')?> <?=$package['amount']?><small>/month</small></span>
				</div>
			 </div>
			 <div>
			 	<?php
			if($package['m_id'] == '1'){
				$btn =  "btn-danger";
			}elseif($package['m_id'] == '2'){
				$btn = "btn-warning";
			}elseif($package['m_id'] == '3'){
				$btn = "btn-primary";
			}elseif($package['m_id'] == '4'){
				$btn = "btn-success";
			}else{
				$btn = "btn-grey";
			}?>
			 	<?php  if($package['m_id'] == '1'){ ?>
			 		<a href="<?=site_url()?>/paypal/renewal_free" class="btn btn-block btn-small <?=$btn?>"><span>Non-Renewable</span></a>
			 		<?php }elseif($this->tank_auth->membership() == $package['m_id'] ){ ?>
				<a href="<?=site_url()?>/paypal/pay/<?=$package['m_id']?>" class="btn btn-block btn-small <?=$btn?>"><span>Renew</span></a>
			<?php }else{ ?>
				<a href="<?=site_url()?>/paypal/pay/<?=$package['m_id']?>" class="btn btn-block btn-small <?=$btn?>"><span>Pay Now</span></a>
			<?php } ?>
				
			 </div>
			</div>
		</div>
	</div>
	
	<?php	} }else{}?>
	
	
</div>